package com.czh.framework.exception.handler;

import com.czh.common.domain.AjaxRes;
import com.czh.framework.exception.TestException;
import com.czh.framework.exception.auth.ErrorMailException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice({"com.czh.system.controller.auth"})
public class LoginControllerExceptionHandler {

    @ExceptionHandler(ErrorMailException.class)
    public AjaxRes handle(ErrorMailException e) {
        return AjaxRes.fault(e.getMessage());
    }

}
